home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
- A Quick Jog Through Configuring The Nrs Processor.
-
-
- Julian Onions
-
- Computer Science Group,
- Nottingham University.
-
-
- Piete Brooks
-
- University of Cambridge Computer Laboratory,
- New Museum Site, Pembroke Street, CB2 3QG
-
-
- Adrian Pell
-
- Department of Computer Science,
- University of Reading.
-
-
-
-
-
- _1. _I_n_t_r_o_d_u_c_t_i_o_n
-
- This document describes how to build yourself a configura-
- tion file for the nrs database cruncher, hereinafter
- referred to as the _n_r_s program.
-
- Currently the _n_r_s program runs under UNIX|- (BSD 4.2/ULTRIX
- 1.2 on VAX 11/750s, VAX 11/780s, Microvax IIs, Orions and
- Suns; V7/ULTRIX 11 on PDP/11s; System V on GEC 63s), VMS
- (VAX VMS C 2.1 on Microvax IIs) and PRIMOS, and can be run
- in one of six modes, as detailed in section 3.2,
-
- 1) York X25 directory mode (R2.2 or R2.1)
-
- 2) MMDF table generation mode.
-
- 3) X25hosts directory mode (UBC code).
-
- 4) Text mode (as per t.central, PR1ME and Edinburgh).
-
- 5) VMS mode.
-
- 6) Sendmail mode (UK or Reading versions).
-
- _________________________
- |- UNIX is a trademark of Bell Laboratories.
-
-
-
-
- December 3, 1988
-
-
-
-
-
- - 2 -
-
-
- 7) DBM mode (for unix-niftp)
-
- _2. _T_h_e _N_R_S _D_a_t_a_b_a_s_e _F_o_r_m_a_t
-
- This is a brief introduction to the structure of the NRS
- Database. For more details, read the NRS document _M_a_k_i_n_g _a_n_d
- _U_s_i_n_g _D_e_r_i_v_e_d _D_a_t_a_b_a_s_e_s by Dr. R.D. Baker, obtainable from
- the University of Salford.
-
- The NRS Database consists of one file which is made up of
- the following sections (previously separate files - these
- are still accepted):
-
- A section known as _M_O_D_U_L_E_2, which contains within it all the
- long and short NRS registered hosts together with associated
- pointers to the _M_O_D_U_L_E_4 section.
-
- A section known as _M_O_D_U_L_E_3, which contains information used
- for reverse lookups and is used if reverse lookups are indi-
- cated.
-
- A section known as _M_O_D_U_L_E_4, which contains information
- groups of records called quads which give the filename and
- offset in one of the _A_T_O_M_I_C sections.
-
- A number of _A_T_O_M_I_C sections, one for each network-context
- pair. These _A_T_O_M_I_C files contain the _D_T_E address of the
- host, the Yellow Book Transport Service address if any, a
- list of application relays if any and the description text
- (in the DESC context only). Therefore to look up a host
- involves three file accesses.
-
- The purpose of the _n_r_s program, is to run through this data
- in one go, and print it out in formats expected by other
- programs.
- NB: The _n_r_s program can be compiled so that only one or two
- output formats are selected. This is to cut down on space
- and memory requirements. If this is the case, some output
- specific keywords may not be recognised.
-
- _3. _T_h_e _c_o_n_f_i_g_u_r_a_t_i_o_n _f_i_l_e
-
-
- nrs [<config-file>] [<options>]*
-
- The normal use is to supply _n_r_s with a configuration file,
- however other options may be added in the same format as the
- configuration file options to overide or alter the options
- in the configuration file. This behaviour is similar to the
- way _a_w_k(1) treats its arguments.
-
- Within the configuration file, of which there should be some
- examples with the program, there are several lines giving
- control information to the nrs program. Each line is read
-
-
-
- December 3, 1988
-
-
-
-
-
- - 3 -
-
-
- in turn and parsed into arguments. Comment lines start with
- a hash `#' character and are completely ignored, as are
- blank lines. All other lines are examined for control
- information. The control line keywords are generally case
- insensitive, but where they specify values such as
- filenames, the filenames must be in the right case. Argu-
- ments are separated by white space.
-
-
- _3._1. _G_e_n_e_r_a_l _C_o_n_t_r_o_l _L_i_n_e_s
-
- The following control lines have general use regardless of
- which mode the program is to run in.
-
- directory <directory-name>
-
- This gives a directory name to prepend to all input file
- names, thus enabling the data to be separated from the
- results. On UNIX a / is inserted between the directory and
- the filename, and the directory parameter if present can be
- overridden for a particular file by either giving the full
- pathname, or a relative pathname (one starting ./ or ../).
- On VMS the filename is directly suffixed to the directory
- name, but the directory is ignored if the pathname contains
- a colon (:), a dollar ($) or an open square bracket ([). On
- PR1MEs a ket (>) is inserted between the directory and the
- filename, unless the file name contains a ket (>), in which
- case it is used directly.
-
- derfil <filename>
-
- This control line sets up the name of the NRS derived file
- for the _n_r_s program. If this line are missing, the filename
- will default to DERFIL2
-
- domains [<filename>]
-
- This control line instructs the processor to include the
- domain gateway information if the format supports it. The
- filename is needed only if it is processing filettes. A
- destination file for the output should be given, i.e.
-
- filedmn top.dmn -top.dmn-
-
- where the special name -top.dmn- is used for mmdf and
- -top.dom- for sendmail.
-
- filedmn <file-name> [<short-dmn-name> [<long-dmn-name> [local]]]
-
- These are used by mmdf and sendmail formats to specify where
- domain table information is to be written for specified
- sub-domains. If no long domain name is given it is assumed
- to be identical to the short domain name. If no short
- domain name is given, then the short domain is set to a
-
-
-
- December 3, 1988
-
-
-
-
-
- - 4 -
-
-
- state where it matches all domains, so this acts as a catch
- all. As these tables are scanned in the order, the order in
- which they appear is critical. To show how these fields
- work, an example of how the nottingham setup is configured.
-
- filedmn uk-ac-nott-dmn uk.ac.nott. uk.ac.nottingham.
- filedmn uk-ac-dmn uk.ac.
- filedmn uk-co-dmn uk.co.
- filedmn cern-dmn cern.
- filedmn desy-dmn desy.
- filedmn top-dmn -top.dmn-
- filedmn misc-dmn
-
- This specifies that having got an address, it is run down
- the list of preferred domains (as set by _s_h_o_r_t/_l_o_n_g ) to see
- if any are a prefix. The last line catches anything
- unmatched. So with a host such as
-
- short long
- uk.ac.nott.cs uk.ac.nottingham.computer-science
-
- There is a match in the first line as uk.ac.nott. is a pre-
- fix. This is then marked as a hit and the long and short
- domains stripped off to give
-
- short long
- cs computer-science
-
- These are then put into the uk-ac-nott-dmn file as
-
- cs:computer-science.nottingham.ac.uk
- computer-science:computer-science.nottingham.ac.uk
-
- With a host such as uk.ac.ucl.cs, the first hit is in the
- uk.ac. entry so the result is put into the uk-ac-dmn file.
- If the host has application relays, these are listed after
- the entry as relays. If the local flags is given, any
- application relays are supressed.
-
- Mmdf and sendmail have special domains, -top.dmn- and
- -top.dom- respectively, to which the NRS gateway information
- is sent, e.g. the fact that mail to MIL. goes via
- uk.ac.ucl.cs. Sendmail also has the special domain
- -abbrev.dom- which is where the aliases between long and
- short forms are put.
-
- filechan <filename> <network> [<prefix>]
-
- Channel tables may also be built whilst constructing the
- domain tables. After putting the name into a domain table,
- the host is looked up in the list of networks attached to
- the filechan control. If a match is found, it is put into
- the associated filename. A typical setup is
-
-
-
-
- December 3, 1988
-
-
-
-
-
- - 5 -
-
-
-
- filechan pss-chan pss
- filechan janet-chan janet
-
- The optional third argument, used only for MMDF, will cause
- that prefix to be stripped off on the RHS of the channel
- table. E.g.
-
- filechan janet-chan janet uk.ac.
-
- will result in entries of the form
-
- name.host.ac.uk:host.name
-
- which may help match up with entries in your x25 directory.
- For sendmail UK-1.4, channel table entries are only con-
- structed for mail sites which need applicatiom relays.
-
-
- gateway [pss|janet] <gatewayhost>
-
- This is used by both york formats and smail format to
- specify a gateway host to a particular network.
-
- relay_host <hostname>
-
- If this is present for MMDF format, then entries are matched
- in the list of domains as before, but have added after their
- entry the hostname specified in the relay_host line. This
- is so that if the host you are building the table for is not
- actually connected to the network directly, all hosts may be
- relayed through another host first to reach the network.
- E.g.
-
- relay_host hcig.nott.ac.uk
-
- would alter the above case of ucl.cs to
-
- cs.ucl:cs.ucl.ac.uk hcig.nott.ac.uk
-
- Any application relays in this case are thrown away. It is
- presumed that the relay host will know the best route from
- then on. Sendmail UK-1.4 used a uk entry in top.dom to do
- off-janet sites.
-
- However to stop spurious entries such as
-
- ourname:ourname.ourdomain.ac.uk relayhost
-
- which is an infinite loop, the local keyword is attached to
- a domain which suppresses the relayhost for those entries.
-
- verbose [<number>]
-
-
-
-
- December 3, 1988
-
-
-
-
-
- - 6 -
-
-
- This parameter sets the level of information messages pro-
- duced to number (or one if missing). If no _v_e_r_b_o_s_e control
- line is present, or the verbose setting is 0, only fatal
- errors and warning messages will be given.
-
- context <context> <network>
-
- This control line specifies to the _n_r_s program that the
- _A_T_O_M_I_C section for the given context and the given network
- should be used. The context parameter may be any of the
- following keywords.
-
- X29 Remote login to an interactive service using
- X29.
-
- TS29 Remote login to an interactive service using
- TS29.
-
- NIFTP File access to some filestore using NIFTP pro-
- tocol.
-
- FTP A synonym for above
-
- MAIL-NIFTP Electronic mail to an individual in some
- organisation, using Grey Book Mail protocol
- over NIFTP.
-
- MAIL A synonym for above.
-
- MAIL-X29 Electronic mail over X29 connections.
-
- MAIL-TELEX Electronic mail to Telex Machines
-
- JTMP Job Transfer and Manipulation Protocol for
- running jobs and printing output.
-
- JTMP-FILES File store references with in JTMP descriptors
- (whatever that means!).
-
- JTMP-REG Registration authorities referenced within
- JTMP descriptors (ditto).
-
- YBTS-NODE Yellow Book Transport Service locations (???)
-
- YBTS Yellow Book Transport service interprocess
- connections (???)
-
- DESC The Description Text for the host.
-
-
- A complete set of contexts and networks should be found in
- the york configuration file supplied as an example.
-
- The network keyword is currently one of
-
-
-
- December 3, 1988
-
-
-
-
-
- - 7 -
-
-
- JANET The Joint Academic network.
-
- PSS The British Telecom Packet Switched network.
-
- TELEX The Telex network.
-
- Often, for a particular type of output, you are only
- interested in certain combinations of contexts and networks,
- for instance mmdf is only interested in mail addresses, so
- most of the contexts are redundant and shouldn't be
- included.
-
- file <filename> <context> <network>
- module2 <filename>
- module3 <filename>
- module4 <filename>
-
- These are used for the old filettes format (do not use these
- - use DERFIL2). They map a section onto a filename.
-
- _3._2. _O_u_t_p_u_t _s_p_e_c_i_f_i_c _c_o_n_t_r_o_l _l_i_n_e_s.
-
- The output format is specified by the output keyword which
- takes optional flags indicating a preference for long or
- short names, the desired mapping as forward or reverse and
- the desired case of the output. After this may come the
- mode and any mode specific options.
-
- output [long|short] [forward|reverse] [mixed|lower] [<mode> [<option>]*]
-
- Several of the modes have a `preferred' mapping (i.e. long
- or short); in mmdf mode it determines which form appears
- first in the tables, the form of the RHS of the domain table
- and the form of the channel table; in sendmail mode it
- specifies which is the main name, and which is the alias.
- If there are no explicit instructions for the requied for-
- mat, do not quote either form.
-
- Normally the sequence is to scan through the MODULE2 sec-
- tion, reading each record in turn and looking up the values
- in the other sections. This behaviour gives the forward
- lookup type tables. If reverse is set, then the MODULE3
- section is read in a record at a time and the various
- records from other sections are collected. This sort of
- processing gives reverse lookup type tables, and is
- currently only generally useful with york and text format
- output.
-
- The case of the produced output can be selected by use of
- the _m_i_x_e_d/_l_o_w_e_r flags which leave the case as it is (usually
- UPPER CASE), or force it to lower case.
-
-
-
-
-
-
- December 3, 1988
-
-
-
-
-
- - 8 -
-
-
- _3._2._1. _Y_o_r_k _F_o_r_m_a_t _O_u_t_p_u_t
-
-
- output york
- output york2.1 [<prefix>]
-
- The optional second parameter represents a prefix string to
- strip off all names and is applicable only to the older for-
- mat (R2.1) directory format. This format should not be used
- as it is highly deficient.
-
- output york2.1 uk.ac.
-
- makes uk.ac.cam.cl appear as cam.cl. With D2.2 the direc-
- tory contains the full names, and the stripping is done much
- more cleverly by the programme which created the DBM file.
-
- _f_o_r_w_a_r_d/_r_e_v_e_r_s_e indicate the direction of the mapping.
-
-
- gateway <network> <string>
-
- Gateway is used if you have to go through a gateway to get
- to a network. The network argument may be pss or janet.
- The string is prefixed to any DTE on the specified network.
- E.g.
-
- Gateway PSS 000000002105/
-
- produces lines of the form
-
- 0:PSS:X:psshost:000000002105/000012345678:
-
-
- _3._2._2. _M_M_D_F _f_o_r_m_a_t _o_u_t_p_u_t
-
- This is rather more complicated than the york format, but
- with an example config file it shouldn't be too hard ...
-
- _s_h_o_r_t/_l_o_n_g indicates whether to generate an mmdf domain
- table mapping short to long addresses, or
- long to short address.
-
- The output in mmdf format is set up by the control line
-
- output mmdf
-
- The hard part comes in working out what domains your
- interested in and what to do with them - see filedmn for
- domain tables and filechan for channel tables.
-
- _3._2._3. _x_2_5_h_o_s_t_s _f_o_r_m_a_t _o_u_t_p_u_t
-
- This format is useful if you are in need of an /etc/hosts
-
-
-
- December 3, 1988
-
-
-
-
-
- - 9 -
-
-
- type of format. It only lists entries without application
- relays or yellow book transport service strings. This is
- currently only used by the UBC X25 software but may be used
- by other 4.2 networking code in the future.
-
- It is enabled by the line
-
- output x25hosts [<prefix>]
-
- The optional second argument is assumed to be a prefix to
- strip off the entries. The output format is
-
- dteaddr [stripped-form] short-form long-form
-
- Addresses with application relays are discarded.
-
- _3._2._4. _T_e_x_t _f_o_r_m_a_t _o_u_t_p_u_t
-
-
- _f_o_r_w_a_r_d/_r_e_v_e_r_s_e should be set as appropriate.
-
- _s_h_o_r_t/_l_o_n_g selects the format in which the name is to
- be printed. The default is to print both.
-
-
- output text
-
-
- The output is in `human readable' format. This is in a
- similar style to the NRS `t.central' format.
-
- _3._2._5. _V_M_S _f_o_r_m_a_t _o_u_t_p_u_t
-
-
- output [ignorerelay] vms
-
-
- The output is in a format for feeding into NETAUTH, one of
- the programmes in the "Coloured Books" package written by
- UWIST and St Andrews and marketed by DEC which runs over
- PSI. The standard header actually generates a DCL command
- file. This produces optimised commands to process all names
- of less than 33 characters (a limitation applied by NETAUTH)
- of the form
-
- D nrsname
- A nrsname+=commonDTEprefix+context1=suffix1+context2=suffix2
-
- It puts quotes wherever there are any suspect characters,
- arranges for the context with a null suffix to appear at the
- end, handles different DTEs for the same name, etc. etc..
- However, the algorithms were worked out by guess work so may
- need fixing.
- NETAUTH cannot make any use of application relays, so if the
-
-
-
- December 3, 1988
-
-
-
-
-
- - 10 -
-
-
- programme is being used as an NRS table generator, then
- these entries are omitted. However, if it is being used as
- a GreyBook table generator, it is permissable to omit the
- application relays, so the flag _i_g_n_o_r_e_r_e_l_a_y can be given,
- and the entries will be generated with the application
- relays doscarded.
-
- _3._2._6. _S_e_n_d_m_a_i_l _a_n_d _S_m_a_i_l _f_o_r_m_a_t _o_u_t_p_u_t
-
-
- _s_h_o_r_t/_l_o_n_g should be set as appropriate for sendmail
- (ignored by smail).
-
-
- output sendmail
- output smail
-
-
- The output is for processing by Jim Crammond's UK Sendmail
- package, or Reading's smail. The sendmail info is based
- upon mmdf's domain and channel tables (see mmdf mode)
-
- _3._2._7. _D_B_M (_u_n_i_x-_n_i_f_t_p) _f_o_r_m_a_t _o_u_t_p_u_t
-
-
- _f_o_r_w_a_r_d/_r_e_v_e_r_s_e should be set as appropriate.
-
- _s_h_o_r_t/_l_o_n_g indicates whether the long or short form is
- the primary key.
-
-
- output dbm
-
-
- The output is in a format for feeding into dbmencode after
- optional editing of fields not supplied by the NRS.
-
- _3._2._8. _P_R_1_M_E _t_e_x_t _f_o_r_m_a_t _o_u_t_p_u_t
-
-
- _f_o_r_w_a_r_d/_r_e_v_e_r_s_e should be set as appropriate.
-
-
- output prime
-
-
- The output is in a format used on PR1ME systems, and is very
- similar to t.central.
-
- _3._2._9. _E_d_i_n_b_u_r_g_h _t_e_x_t _f_o_r_m_a_t _o_u_t_p_u_t
-
-
- output edtext [simple|short|long]
-
-
-
-
- December 3, 1988
-
-
-
-
-
- - 11 -
-
-
- The output is in a text format devised in Edinburgh, much
- preferable to t.central. If short and/or long is specified
- every line is to be prefixed with the relevant name, e.g. to
- allow a simple search to return the useful information. If
- no flag is given, short is used (simple implies no names).
-
- This format is intended to dump the ENTIRE database, so ALL
- contexts should be requested. If this is not done, a warn-
- ing is generated when the first missing context is pro-
- cessed.
-
- _4. _S_u_p_p_l_e_m_e_n_t_a_l _c_o_m_m_a_n_d_s
-
-
- comment <filename>
-
- will cause the contents of the file given to be filtered
- through a small macro expander which replaces certain keys
- with values rather like RCS keywords, when writing to an
- output for the first time. This helps keep files in sync
- across several machines. At present the following keys are
- expanded:
-
- $C$ This expands to some text relevant to the output type.
-
- $D$ The current date and time in ctime(3) format.
-
- $F$ The current file name.
-
- $H$ The hostname of this host. This may be set with the
- control _h_o_s_t_n_a_m_e _s_t_r_i_n_g (see below).
-
- $N$ The Version of the NRS database used in building this
- file. This information is gleaned from the database
- headers.
-
-
- hostname <name>
-
- specifies the hostname for the comment field $H$. This
- overrides the name returned by the gethostname (BSD) or
- uname (USG) call.
-
- _5. _E_r_r_o_r _m_e_s_s_a_g_e_s.
-
- Most error messages are hopefully self explanatory, but a
- few could bear further explanation.
-
-
-
-
-
-
-
-
-
-
- December 3, 1988
-
-
-
-
-
- - 12 -
-
-
-
- lru botch - can't reclaim an lru file descriptor.
- problem on getm2rec rec %d - bad format MODULE2 section
- Can't find corresponding short entry for %s
- - again a bad format MODULE2 section
- problem on getm4rec rec %d - bad format MODULE4 section
- already got a dte - a host has more than one dte address
- already got a yb - a host has more than one ybts string
- unknown line, '%s' '%s' - bad format atomic file
- Files are out of sync - the atomic files + the modules files
- are not all from the same run of the salford
- database - reget the atomic + modules files.
-
-
- _6. _P_r_o_b_l_e_m_s
-
- No doubt there will be problems ... if so you can contact
- any of us at:
-
- Email Addresses:
-
- jpo@uk.ac.nott.cs (jpo@uk.ac.nottingham.computer-science)
- jpo@uk.ac.nott.hcig (jpo@uk.ac.nottingham.psychology.hcig)
-
- pb@uk.ac.cam.cl (pb@uk.ac.cambridge.computer-lab)
- cam-cl.uucp!pb (...mcvax!ukc!cam-cl!pb)
-
- A.R.Pell@uk.ac.reading
-
- Alternatively if you're really stuck try
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- December 3, 1988
-
-
-
-
-
- - 13 -
-
-
-
- Snail Mail:
-
- Julian Onions
- Computer Science Group,
- Nottingham University
- University Park,
- Nottingham
- NG7 2RD
- (+44) 602 506101 x3595
-
- Piete Brooks
- Computer Laboratory,
- New Museum Site,
- Pembroke Street,
- Cambridge
- CB2 3QG
- (+44) 223 334659 (DDI)
-
- Adrian Pell
- Dept. of Computer Science
- University of Reading
- PO Box 220
- Reading
- RG6 2AX
- (+44) 734 875123 x 411
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- December 3, 1988
-
-
-